<template>
<div>
  <input type="file" @change="handleFileUpload" />
</div>
</template>

<script>
import axios from "axios";
export default {
  name: "ExcelUpload",
  methods: {
    handleFileUpload(event) {
      const file = event.target.files[0];
      const formData = new FormData();
      formData.append('file', file);
      axios.post('http://localhost:8080/upload', formData, {
        headers: {
          'Content-Type': 'multipart/form-data'
        }
      }).then(response => {
        console.log(response.data);
      }).catch(error => {
        console.error(error);
      });
    }
  }
}
</script>

<style scoped>

</style>